﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        public static int RandomNumber(int min, int max)
        {
            Random random = new Random(DateTime.Now.Millisecond);
            return random.Next(min, max+1);
        }

        static void Main(string[] args)
        {
            Bus test = new Bus();

            List<string> testl = new List<string>(test.scanBus);

//             int count = 0, count2 = 1;
//             Console.WriteLine("\tAlle an den Bus angeschlossenen Geräte:");
//             Console.WriteLine("==================================================== \n");
//             foreach (string S in testl)
//             {
//                 System.Threading.Thread.Sleep(100);
//                 if (int.Parse(S.Substring(2,2)) > count2)
//                 {
//                     Console.Write("\n\n");
//                     count2++;
//                     count = 0;
//                 }
//                 if (count == 5)
//                 {
//                     Console.Write("\n");
//                     count = 0;
//                 }
//                 Console.Write(S + "   ");
//                 count++;
//             }
            test.detectdev(testl);
            Console.ReadLine();
        }

    }

}
